package com.bblocks.auth.pojo.entity;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;


import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.pig4cloud.pig.common.mybatis.typeHandler.GeoPointTypeHandler;
import com.bblocks.typeHandler.GeoPoint;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * <p>
 * 用户表
 * </p>
 *
 * @author Mr.Chen
 * @since 2019-07-27
 */
@Data
@EqualsAndHashCode(callSuper=false)
@TableName("ls_user")
public class Users extends Model<Users> {

    private static final long serialVersionUID = 1L;

    /**
     * 用户ID 主键
     */
    @TableId(value = "yuezhu_id", type = IdType.AUTO)
    private Long id;


    /**
     * 关联到 ls_usr_detail
     */
    @TableField(value = "id")
    private String  mallId;

    /**
     * 登录名(唯一)
     */
    private String name;

    /**
     * 	真实姓名
     */
    private String realName;

    /**
     * 用户密码（废弃）
     */
    private String userPassword;
    /**
     *用户密码
     */
	@JsonIgnore
    private String password;

    /**
     * 用户手机号
     */
    private String userPhone;

    /**
     * 性别 0女 1男
     */
    private Integer gender;

    /**
     * 平台类型 1：社区平台  2：大宗贸易平台
     */
    private String platformType;

    /**
     * 注册时间
     */
    private Date registerTime;

    /**
     * 身份证号
     */
    private String idCardNumber;

	/**
	 * '身份证正面照'
	 */
	@JsonIgnore
	private String idCardImg1;

	/**
	 *'身份证反面照'
	 */
	@JsonIgnore
    private String idCardImg2;

	/**
	 * '身份证手持照'
	 */
	@JsonIgnore
	private String idCardImg3;

    /**
     * 0:停用
     * 1:启用
     */
    private String userStatus;

    /**
     * 1:身份未认证
	 * 2:身份证信息已提交，待审核
	 * 3:已实名认证
	 * 4:审核失败
     */
    private String idCardStatus;

    /**
     * 实名认证审核说明
     */
    private String cardStatusRemark;

    /**
     * 1:银行卡未认证
2:银行卡已绑定
     */
    private String banckcardStatus;

    /**
     * 用户最后一次登录时间
     */
    private Date userCurrentLogintime;

    /**
     * 昵称
     */
    private String nickName;

    /**
     * 生日
     */
    private Date birthday;

    /**
     * 图像
     */
    private String headPicture;

    /**
     * 0女 1男
     */
    private Integer nickGender;

    /**
     * 年龄
     */
    private Integer age;

    private Date addTime;

    private Long sellersCommanyId;

    private String sellersFixedphone;

    private Long sellersUserId;

    private String sellersUserName;

    private String sellersUserPhone;

    private String sellersUserStatus;

    private String sellersUserType;

//    private String userPassWord;

    private Long usersId;

    private String fullUserHeadPicture;

    private Integer loginErrorNum;

    /**
     *	 图片公网地址
     */
    private String imgUrl;

    private String wxOpenId;

    private String wxSessionKey;
    
    private String sbOpenId;

    private String sbSessionKey;
    
    private String wxAppOpenId;

    /**
     * 号
     */
    private String yuezhuNum;

    /**
     * 多个服务公用的登入凭据
     */
    @TableField(exist = false)
    @Schema(description="token")
    private String commonToken;
    
    private String jiguPassword;
    
    @TableField(exist = false)
    private Integer memberLevel;
    
    @TableField(exist = false)
    private Integer companyId;
    
    @TableField(exist = false)
    private String userType;
    
    @TableField(exist = false)
    private List<Map<String, Object>> menuPermissions;
    
    @TableField(exist = false)
	@Schema(description = "app类型"/*,notes = "com.bblocks.enums.AppTypeEnum"*/)
    private Integer type;
    
    @TableField(exist = false)
    private Integer personalized;
    
    @TableField(exist = false)
    private String accessToken;
    
    @TableField(exist = false)
    private String random;
    
    @TableField(exist = false)
    private Integer isShare;
    
    @TableField(exist = false)
    private String companyCity;
    
    @TableField(exist = false)
    private String CompanyCityName;
    
    @TableField(exist = false)
    private String companyRoleId;
    
    @TableField(exist = false)
    private String personalRoleId;

/*	@TableField(exist = false)
	@Schema(description = "商家用户角色")
	private CmpRole role;*/

	@TableField(value="location",typeHandler = GeoPointTypeHandler.class)
	@Schema(description="社交经/纬度")
	private GeoPoint location;

	@Schema(description="用户业务编码，多个逗号分隔(关联yz_service_catalog.code)")
	private String businessCode;

	/*@TableField(exist = false)
	@Schema(description = "商家用户所属公司")
	private CompanyBaseInfoVo companyBaseInfo;*/

    //@Override
	public Serializable pkVal() {
        return this.id;
    }


}
